import type { AppRouteModule } from '/@/router/types';

import { LAYOUT } from '/@/router/constant';
import { t } from '/@/hooks/web/useI18n';

const patent: AppRouteModule = {
  path: '/patent',
  name: 'Patent',
  component: LAYOUT,
  redirect: '/patent/patent',
  meta: {
    orderNo: 1000,
    icon: 'ant-design:file-text-outlined',
    title: t('routes.patent.patent'),
  },
  children: [
    {
      path: 'patent',
      name: 'PatentManagement',
      component: () => import('/@/views/patent/patent/PatentList.vue'),
      meta: {
        title: t('routes.patent.patentList'),
        icon: 'ant-design:file-text-outlined',
      },
    },
    {
      path: 'inventor',
      name: 'InventorManagement',
      component: () => import('/@/views/patent/inventor/InventorList.vue'),
      meta: {
        title: t('routes.patent.inventor'),
        icon: 'ant-design:user-outlined',
      },
    },
    {
      path: 'institution',
      name: 'InstitutionManagement',
      component: () => import('/@/views/patent/institution/InstitutionList.vue'),
      meta: {
        title: t('routes.patent.institution'),
        icon: 'ant-design:bank-outlined',
      },
    },
    {
      path: 'analysis',
      name: 'PatentAnalysis',
      redirect: '/patent/analysis/timeline',
      meta: {
        title: t('routes.patent.analysis'),
        icon: 'ant-design:bar-chart-outlined',
      },
      children: [
               {
                 path: 'timeline',
                 name: 'PatentTimeline',
                 component: () => import('/@/views/patent/analysis/timeLine/TimeLineIndex.vue'),
                 meta: {
                   title: t('routes.patent.timeline'),
                   icon: 'ant-design:clock-circle-outlined',
                 },
               },
        {
          path: 'genealogy',
          name: 'PatentGenealogy',
          component: () => import('/@/views/patent/analysis/genealogy/TreeIndex.vue'),
          meta: {
            title: t('routes.patent.genealogy'),
            icon: 'ant-design:branches-outlined',
          },
        },
        {
          path: 'graph',
          name: 'PatentGraph',
          component: () => import('/@/views/patent/analysis/graph/Index.vue'),
          meta: {
            title: t('routes.patent.graph'),
            icon: 'ant-design:apartment-outlined',
            carryParam: true,
            ignoreRoute: true,
          },
        },
      ],
    },
  ],
};

export default patent;
